Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow fully qualified or short references to be used to generate "reference" Uri #2110

Merged
merged 4 commits into from
Feb 25, 2020

Conversation

shiftkey
Copy link
Member

@shiftkey shiftkey commented Feb 25, 2020

Supersedes #1934
Fixes #1933

  • review outstanding feedback from previous PR
  • add new unit tests for omitting refs
  • update xml-docs
  • add integration tests for including or omitting refs

@codecov
Copy link

codecov bot commented Feb 25, 2020

Codecov Report

Merging #2110 into master will increase coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2110      +/-   ##
==========================================
+ Coverage   66.84%   66.86%   +0.01%     
==========================================
  Files         542      542              
  Lines       14221    14241      +20     
==========================================
+ Hits         9506     9522      +16     
- Misses       4715     4719       +4     

@shiftkey shiftkey changed the title Allow fully qualified or short references to be used to generate "reference" Uri [WIP] Allow fully qualified or short references to be used to generate "reference" Uri Feb 25, 2020
@shiftkey shiftkey force-pushed the just-a-regular-fix-nothing-to-see-here branch from 5a5d6e1 to eae8607 Compare February 25, 2020 18:44
@shiftkey shiftkey changed the title [WIP] Allow fully qualified or short references to be used to generate "reference" Uri Allow fully qualified or short references to be used to generate "reference" Uri Feb 25, 2020
public IObservable<Reference> GetAllForSubNamespace(string owner, string name, string subNamespace, ApiOptions options)
{
Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
Ensure.ArgumentNotNullOrEmptyString(subNamespace, nameof(subNamespace));
Ensure.ArgumentNotNull(options, nameof(options));

if (subNamespace.StartsWith("refs/"))
{
subNamespace = subNamespace.Replace("refs/", string.Empty);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ended up going with this approach to make the fixes more explicit, and I'd like to eventually do away with the ApiUrls shorthand because it makes correlating things to API routes harder...

@shiftkey shiftkey merged commit 65bb8d5 into master Feb 25, 2020
@shiftkey shiftkey deleted the just-a-regular-fix-nothing-to-see-here branch February 25, 2020 22:24
@shiftkey
Copy link
Member Author

release_notes: Added support for handling fully qualified references in Git.References endpoints

@nickfloyd nickfloyd added Type: Bug Something isn't working as documented and removed category: bug labels Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working as documented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Octokit says that a tag does not exist when it does, in fact
3 participants